#ifndef QHMAINWINDOW_H
#define QHMAINWINDOW_H

#include <QMainWindow>

#include "QHVlcPlayer.h"

QT_BEGIN_NAMESPACE
namespace Ui { class QHMainWindow; }
QT_END_NAMESPACE

class QHMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    QHMainWindow(QWidget *parent = nullptr);
    ~QHMainWindow();

private slots:
    void on_openButton_clicked();
    void on_stopButton_clicked();
    void on_playButton_clicked();
    void on_startButton_clicked();
    void slotProgressSliderMoved(int value);
    void slotVolumeSliderMoved(int value);
    void slotPositionChanged(float pos);
    void slotTimeChanged(long long msec);
    void slotMediaPlaying();
    void slotMediaError();

private:
    void sleep(int msec);
    QString formatTime(long long time);

private:
    Ui::QHMainWindow *ui;

    QHVlcPlayer *m_vlcPlayer;
};
#endif // QHMAINWINDOW_H
